# Maintainer: TDY <tdy@gmx.com>

pkgname=foxitreader
pkgver=1.0
pkgrel=3
pkgdesc="A small, fast PDF viewer"
arch=('i686' 'x86_64')
url="http://www.foxitsoftware.com/pdf/desklinux/"
license=('custom')
depends=('desktop-file-utils' 'gtk2')
[[ $CARCH = x86_64 ]] && depends=('desktop-file-utils' 'lib32-gtk2' 'lib32-libxdamage')
install=fr.install
source=(http://mirrors.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/$pkgver/enu/FoxitReader-$pkgver-1.i386.tar.bz2
        http://www.foxitsoftware.com/pdf/rd_eula.htm
        fr.desktop fr.launcher fr.png)
md5sums=('748d6713f2df9ade11da44bafa4b1b1d'
         '90b1568272c83abfc56ae5695295d211'
         '21e108c58effa2ed69c74fbbd2af1454'
         '7a3502e7925cec01c7f750bb6d4c0108'
         '9dbaa8ac779463948c321fdb0d5b4725')

build() {
  cd "$srcdir"
  install -Dm755 FoxitReader "$pkgdir/usr/share/$pkgname/FoxitReader"
  install -Dm644 fum.fhd "$pkgdir/usr/share/$pkgname/fum.fhd"
  install -Dm644 fpdfcjk.bin "$pkgdir/usr/share/$pkgname/fpdfcjk.bin"
  install -Dm644 fr.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
  install -Dm644 fr.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 rd_eula.htm "$pkgdir/usr/share/licenses/$pkgname/EULA.htm"
  install -Dm755 fr.launcher "$pkgdir/usr/bin/$pkgname"
  ln -sf $pkgname "$pkgdir/usr/bin/fr"
}
